{namespace dce=ArminVieweg\Dce\ViewHelpers}

<f:layout name="Backend" />
<f:section name="iconButtons">
	<f:be.buttons.icon uri="{f:render(partial:'Module/NewDceLink')}" icon="actions-document-new" title="{f:translate(key:'LLL:typo3conf/ext/dce/Resources/Private/Language/locallang_mod.xml:createNewDce')}" />
</f:section>
<f:section name="content">
	<dce:be.includeCssFile path="{f:uri.resource(path:'CSS/dceModule.css', extensionName: 'dce')}" />

    <f:if condition="{enableUpdateCheck}">
        <div class="versioncheck">
            <a href="http://dce.v.ieweg.de/versioncheck/update" target="_blank"><img src="http://dce.v.ieweg.de/versioncheck?t3={dce:be.currentTypo3Version()}&amp;dce={dce:be.currentDceVersion()}&amp;l={dce:be.currentLanguage()}" alt="" /></a>
        </div>
    </f:if>
	<div class="buttons">
		<div class="button">
			<input type="button" value="{f:translate(key:'LLL:EXT:dce/Resources/Private/Language/locallang_mod.xml:goToListView')}" onclick="location.href = '{f:uri.page(additionalParams:'{M:\'web_list\', id:\'0\', table:\'tx_dce_domain_model_dce\', imagemode:\'1\'}')}';" />
		</div>
		<div class="button">
			<form method="get" action="https://www.paypal.com/cgi-bin/webscr" target="_blank">
				<input type="hidden" name="cmd" value="_s-xclick" />
				<input type="hidden" name="hosted_button_id" value="2DCCULSKFRZFU" />
				<input type="hidden" name="thank" value="you very much" />
				<input type="submit" value="{f:translate(key:'LLL:EXT:dce/Resources/Private/Language/locallang_mod.xml:donate')}" />
			</form>
		</div>

		<div class="button unobtrusive">
			{f:translate(key:'LLL:EXT:dce/Resources/Private/Language/locallang_mod.xml:donateText')}
		</div>

		<div class="clear"></div>
	</div>

	<ul>
		<f:for each="{dces}" as="dce">
			<li>
				{dce.title}
				<f:if condition="{dce.uid}">
					<f:then>
						<!-- Database DCE -->
						<a href="{f:render(partial:'Module/OpenDce', arguments:'{uid:\'{dce.uid}\'}')}">uid:{dce.uid}</a>

					</f:then>
					<f:else>
						<!-- Filebased DCE -->
						<a href="{f:render(partial:'Module/OpenStaticDce', arguments:'{identifier:\'{dce.identifier}\'}')}">{dce.identifier}</a>

					</f:else>
				</f:if>
			</li>
		</f:for>
	</ul>
</f:section>